import { request } from '../../util/request';

interface UserProfile {
  id: number;
  username: string;
  avatar: string;
  bio: string;
  followers: number;
  following: number;
  works: {
    id: number;
    cover: string;
    likes: number;
  }[];
}

export const getUserProfile = (userId: number): Promise<UserProfile> => {
  // 模拟数据
  return Promise.resolve({
    id: userId,
    username: '用户昵称',
    avatar: 'https://placeholder.com/150',
    bio: '这是一个用户简介示例',
    followers: 123,
    following: 456,
    works: Array(6).fill(0).map((_, i) => ({
      id: i,
      cover: `https://placeholder.com/300?text=作品${i+1}`,
      likes: Math.floor(Math.random() * 1000)
    }))
  });
};